package com.ebei.admin.controller;

import com.ebei.admin.service.SysProjectService;
import com.ebei.common.util.Result;
import com.ebei.common.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/project")
@Api(value = "项目", description = "项目接口")
public class ProjectController extends BaseController {

    @Autowired
    private SysProjectService sysProjectService;

    @ApiOperation(value = "根据企业查询项目")
    @ApiImplicitParam(name = "orgId", value = "组织id", required = true)
    @GetMapping("/byOrgId")
    public Result findByOrgId(@RequestParam Integer orgId) {
        return sysProjectService.findByOrgId(orgId);
    }

}
